package com.smedi.ismedi.progress.core.port.adapter.persistence.repository.impl;

import com.smedi.ismedi.constructionproject.api.dto.response.ProjectBasicResponse;
import com.smedi.ismedi.constructionproject.api.dto.response.resp.ProjectResp;
import com.smedi.ismedi.progress.core.domain.repository.ProgressProjectRepository;
import com.smedi.ismedi.progress.core.port.adapter.service.ProjectProgressService;
import com.smedi.ismedi.web.starter.common.PaginationData;
import com.smedi.ismedi.web.starter.common.ResponseData;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author pengyan
 * @Date 2022/9/16 13:45
 */
@Service
@AllArgsConstructor
public class ProgressProjectRepositoryImpl implements ProgressProjectRepository {

    private final ProjectProgressService projectProgressService;
    @Override
    public  ResponseData<List<ProjectBasicResponse>> getProjectList(Long hrOrganizationId) {
        return projectProgressService.getProjectList(hrOrganizationId);
    }

    @Override
    public ResponseData<List<ProjectBasicResponse>> getQueryProjectBasicListByHrOrganizationIds(List<Long> hrOrganizationIds) {
        return projectProgressService.getQueryProjectBasicListByHrOrganizationIds(hrOrganizationIds);
    }

    @Override
    public ResponseData<ProjectBasicResponse> getQueryProjectBasicView(Long projectId) {
        return projectProgressService.getQueryProjectBasicView(projectId);
    }

    @Override
    public List<ProjectResp> getProjectListWithoutToken(List<Long> ids) {
        return projectProgressService.getProjectListWithoutToken(ids);
    }

    @Override
    public ResponseData<List<ProjectBasicResponse>> getProjectListByApp(String appSearch,List<Long> ids) {
        return projectProgressService.getProjectListByApp(appSearch,ids);
    }

    @Override
    public ResponseData<PaginationData> getProjectList(Long offset, Long pageSize, String projectName, String projectCode, String projectManager, Long hrOrganizationId, String supervisionUnit, String projectStatus, String projectCategory, String contractDurationBegin, String contractDurationEnd) {
        return null;
    }

    @Override
    public ProjectBasicResponse getProject(Long projectId) {
        return projectProgressService.getProject(projectId);
    }
}
